<?php
if ($foo) {
   $foo = 5;
}

// Can be replaced with
$foo or $foo = 5;

?>

I use this often for setting variables in functions with optional parameters.

<?php

function foobar($a = null, $b = null) {
   $a or $a = 10;
   $b or $b = 20;
   //...
} 